/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.dian.modules.sale.entity.ProbLineEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import com.dian.common.entity.BaseEntity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.dian.common.validator.group.Group;
import org.hibernate.validator.constraints.Length;
/**
 * 计量单位
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-05-14 17:52:50
 */
@Data
@TableName("base_uom")
public class UomEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;


    /**
	 * 计量单位编码
	 */
    @NotBlank(message="计量单位编码不能为空", groups={AddGroup.class, UpdateGroup.class})
    @Length(max=20, groups={AddGroup.class, UpdateGroup.class}, message="计量单位编码长度不能超过20个字符")
    private String uomCode;

    /**
     * 上级ID
     */
    @NotNull(message="上级ID不能为空", groups={AddGroup.class, UpdateGroup.class})
    @JsonProperty(value = "pId")
    private Long pId;
    /**
	 * 计量单位名称
	 */
    @NotBlank(message="计量单位名称不能为空", groups={AddGroup.class, UpdateGroup.class})
    @Length(max=20, groups={Group.class}, message="计量单位名称长度不能超过20个字符")
    private String uomName;
    /**
	 * 是否有效:1-启用-NORMAL;2-禁用-DISABLE
	 */
    private Integer isValid;

}
